﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ReviewBug.aspx.cs" Inherits="Workflow.ReviewBug" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
    <link rel="stylesheet" type="text/css" href="../Css/bootstrap.css" />
    <link rel="stylesheet" type="text/css" href="../Css/bootstrap-responsive.css" />
    <link rel="stylesheet" type="text/css" href="../Css/style.css" />
    <%--<link href="Css/css.css" rel="stylesheet" type="text/css" />--%>
    <link type="text/css" rel="stylesheet" href="css/pagination.css" />
    <script type="text/javascript" src="../Js/jquery.js"></script>
    <script type="text/javascript" src="../Js/bootstrap.js"></script>
    <script type="text/javascript" src="../Js/ckform.js"></script>
    <script type="text/javascript" src="../Js/common.js"></script>
    
    <script type="text/javascript" src="Scripts/MyJquery.js"></script>
    <script type="text/javascript" src="Scripts/jquery.js"></script>
    <script type="text/javascript" src="Scripts/jquery.pagination.js"></script>
    <script type="text/javascript" src="Scripts/Pageination.js"></script>
</head>
<body>
    <form id="form1" runat="server">
    <div style="width:96%;margin:auto">
         <h4>待审批</h4>
    </div>
    <div>
     
         <table class="table table-bordered definewidth m10">
            <thead>
                <% for (int i = 0; i < resultList.Count; i++) %>
                <% { %>
                <tr>
                    <th></th>
                    <th>工作流序号</th>
                    <th>创建人</th>
                    <th>工作流名称</th>
                    <th>标题</th>
                    <th>节点名称</th>
                    <th>创建时间</th>
                    <th>紧急程度</th>
                    <th>退回原因</th>
                    <th></th>
                    <th></th>
                    <th></th>
                    <th></th>
                </tr>  
                <% break; %>
                <% }%>             
            </thead>
            <tbody id="Searchresult"></tbody>
            <tbody id="hiddenresult" style="display:none">
                <% for (int i = 0; i < resultList.Count; i++) %>
                <% { %>
                <tr class="result">
                    <%if(resultList[i].IsRead==0) {%>
                        <td><a id="Read<%= resultList[i].WorkChildId %>" href="#" onclick="Read(<%= resultList[i].WorkChildId %>)"><img src="Images/未读.png" /></a></td>
                    <% }%>
                     <% else{%>
                        <td><a class="Read"><img src="Images/已读.png" /></a></td>
                    <% }%>
                    <%if(resultList[i].ChildStatusNo==-1) {%>
                        <td class="yellowColor"><% =resultList[i].WorkParentId %></td>
                    <% }%>
                    <% else{%>
                        <td><% =resultList[i].WorkParentId %></td>
                    <% }%>
                    <td><% =resultList[i].CreaterDisplayName %></td>
                    <td><% =resultList[i].WorkName %></td>
                    <td><% =resultList[i].Content %></td>
                    <td><% =resultList[i].NodeName %></td>
                    <td><% =resultList[i].CreateTime %></td>
                    <td><% =resultList[i].Critical %></td>
                    <%if (resultList[i].ReturnReason != "")
                      {%>
                        <td class="redColor"><% =resultList[i].ReturnReason %></td>
                    <%} else{%>
                        <td><% =resultList[i].ReturnReason %></td>
                    <%}%>
                    <td><a  href="#" onclick="DetailUrl('<% =resultList[i].WebName %>',<%= resultList[i].WorkParentId %>,0)">详情</a></td>
                    <td><a id="Pass<%= resultList[i].WorkChildId %>" class="Pass" href="#" onclick="Pass(<%= resultList[i].WorkParentId %>,<%= resultList[i].WorkChildId %>,<%= resultList[i].StatusNo %>,<%= resultList[i].ChildStatusNo %>,<%= resultList[i].IsSingleNode %>,<%= resultList[i].ChildNodeNo %>,<%= resultList[i].NodeCount %>)"><img src="Images/572.png" title="通过"/></a></td>
                    <%if(resultList[i].IsSingleNode==1) {%>
                        <td><a href="#" onclick="Return(<%= resultList[i].WorkParentId %>,<%= resultList[i].WorkChildId %>,<%= resultList[i].StatusNo %>,<%= resultList[i].ChildStatusNo %>)"><img src="Images/540.png" title="退回"/></a></td>
                    <% }%>
                    <% else{%>
                        <td><a id="Pause<%= resultList[i].WorkChildId %>" href="#" onclick="Pause(<%= resultList[i].WorkParentId %>,<%= resultList[i].WorkChildId %>,<%= resultList[i].StatusNo %>,<%= resultList[i].ChildStatusNo %>,<%= resultList[i].ChildStatusNo %>)"><p>暂停</p></a></td>
                    <% }%>
                    <td><a href="#" onclick="UpLoad(<%= resultList[i].WorkParentId %>,0)"><img src="Images/176.png" title="上传下载" /></a></td>
                </tr>
                <% }%>
            </tbody>
         </table>
         <div id="Pagination" class="pagination definewidth m10"></div>
         
    </div>
    </form>
    <script type="text/javascript">
        $(document).ready(function () {
            var count = "<% =resultList.Count%>";
            if (count >= 10) {
                $("#Pagination").show();
            } else {
                $("#Pagination").hide();
            }
        });

    </script>
    <script type="text/javascript">
        //$(document).ready(function () {
        //$(".DetailUrl").click(function () {
        //    var url = $(this).attr("href");
        //    openWin(url, 720, 500);
        //    return false;
        //});
        //$(".Pass").click(function () {
        //    var url = $(this).attr("href");
        //    var tr = $(this).parent().parent();
        //    $.ajax({
        //        type: "Get",
        //        url: url,
        //        success: function (data) {
        //            if (data>0) {
        //                tr.remove();
        //                alert("工作流序号" + data + "已被提交");
        //            } else {
        //                var workflow = $.parseJSON(data);
        //                //alert(workflow.WorkParentId);
        //                var sendUrl = "SendInfo.aspx?WorkParentId=" + workflow.WorkParentId;
        //                //sendUrl += "&WorkChildId=" + workflow.WorkChildId;
        //                sendUrl += "&NodeNo=" + workflow.StatusNo;
        //                //sendUrl += "&ChildStatusNo=" + workflow.ChildStatusNo;
        //                //sendUrl += "&IsSingleNode=" + workflow.IsSingleNode;
        //                //sendUrl += "&ChildNodeNo=" + workflow.ChildNodeNo;
        //                //sendUrl += "&Type=Pass";
        //                openWin(sendUrl, 720, 500);
        //            }

        //        }
        //    });
        //    return false;
        //});
        //$(".Return").click(function () {
        //    //var url = $(this).attr("href");
        //    //var tr = $(this).parent().parent();
        //    //if (confirm("确认退回此工作流？")) {
        //    //    DelTr(url, tr, "工作流序号", "已被退回")
        //    //}
        //    var url = $(this).attr("href");
        //    openWin(url, 720, 500);
        //    return false;
        //});
        //$(".Pause").click(function () {
        //    var url = $(this).attr("href");
        //    var tr = $(this).parent().parent();
        //    if (confirm("确认暂停此工作流？")) {
        //        tr.children(":first").attr("class", "yellowColor");
        //        $.ajax({
        //            type: "get",
        //            url: url,
        //            success: function (data) {
        //                alert("工作流序号" + data + "已被暂停");
        //            }
        //        });
        //    }
        //    return false;
        //});
        //$(".UpLoad").click(function () {
        //    var url = $(this).attr("href");
        //    openWin(url, 720, 500);
        //    return false;
        //});
        //$(".Read").click(function () {
        //    var url = $(this).attr("href");
        //    var img = $(this).find('img');
        //    $.ajax({
        //        type: "get",
        //        url: url,
        //        success: function (data) {
        //            img.attr('src', 'Images/已读.png');
        //        }
        //    });
        //    return false;
        //});
        //});
    </script>
</body>
</html>
